<template>
  <div class="processCenter" style="height: 390px;">
    <el-card class="processCenter">
      <div slot="header" class="attributes">
        <img src="@/assets/images/dbgz.png" class="dbgz">
        <b>公告公示</b>
        <el-button style="float: right; padding: 3px 0;color: #768893;" type="text">更多</el-button>
      </div>
      <div>
        <div>
          <div v-for="(item,index) in dataList " :key="index" class="messagebox" @click="getDetail(item)">
            <div class="me-left">
              <span class="messagetitle">{{ item.noticeTitle }}</span>
            </div>
            <div class="item-time">{{ parseTime(item.createTime, '{y}-{m}-{d}') }}</div>
          </div>
        </div>
      </div>
    </el-card>
  </div>
</template>
<script >
import { allList, getNotice } from "@/api/system/notice";
export default {
  data() {
    return {
      // 遮罩层
      loading: true,
      dataList: [],
    }
  },
  mounted() {
    this.getList()
  },
  methods: {
    getDetail(item) {
      this.$message.warning('正在开发中，敬请期待')
    },
    getList() {
      this.getNotice()
    },
    getNotice() {
      this.loading = true;
      var response = [
        { noticeTitle: "关于XXX年度拟提名XXX的公示", createTime: "2025-08-08 22:22:22" },
        { noticeTitle: "国家网络安全宣传周知识宣传", createTime: "2025-08-09 22:22:22" },
        { noticeTitle: "年度科学技术奖总评审结果公示", createTime: "2025-08-10 22:22:22" },
        { noticeTitle: "技术研究院关于公开选聘专业技术人员的通知", createTime: "2025-08-10 22:22:22" },
        { noticeTitle: "关于提名XXX年度XXX省科学技术奖提名项目的公示", createTime: "2025-08-10 22:22:22" }
      ]
      this.dataList = response
      this.loading = false;
    }
  }
}
</script>
<style lang="scss" scoped>
  .processCenter {
    width: 100%;
    height: 100%;
    background: #fff;
    .el-card__body{
      height: 100% !important;
      display: flex;
      flex-direction: column;
      overflow: hidden!important;
    }
    .messagebox{
      margin: 20px 0 0 20px;
      display: flex;
      align-items: center;
      cursor: pointer;
      .me-left{
        flex: 1;
        display: flex;
        align-items: center;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        margin-right: 20px;
        font-size: 14px;
      }
      .item-time{
        width: 75px;
        font-size: 14px;
        font-weight: 300;
        color: #909399;
      }
      &:hover {
        opacity:0.6;
      }
    }
    .messagetitle{
      min-width: 400px;
      width: 400px;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      color: #606266;
    }
  }
  .dbgz{
    border: 0px;
    border-radius: 5px;
    width: 18px;
    height: 18px;
    margin-right: 5px;
    vertical-align: middle;
  }
</style>
<style scoped>
 .processCenter /deep/ .el-card__body{
    height: 100% !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0px 20px 20px 20px;
 }
 .processCenter  /deep/ .el-card__header {
   border-bottom: none;
 }

</style>
